package com.fms.gui.emailer.components;

import junit.framework.TestCase;

import org.jmock.Expectations;
import org.jmock.Mockery;

import com.fms.model.messaging.IEmailService;

public class SendButtonTest extends TestCase
{
	Mockery mock;
	
	public void setUp()
	{
		mock = new Mockery();
	}
	
	public void tearDown()
	{
		mock.assertIsSatisfied();
	}
	
	public void testSendEmailOnClick()
	{
		final IEmailService e = mock.mock(IEmailService.class);
		
		SendButton b = new SendButton(e);
		
		mock.checking(new Expectations()
		{{
			oneOf(e).sendMail();
		}});
		
		
		b.doClick();
		
		
	}
}
